package hts.project.controller;

import hts.project.service.SearchService;
import hts.project.vo.StoreVO;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class SearchController {
	
	@Autowired
	private SearchService searchService;
	
	@RequestMapping("selectAllStore.do")
	public ModelAndView selectAll() 
	{		
		List<StoreVO> list = this.searchService.selectAllStore();
		
		ModelAndView mav = new ModelAndView();
		
		mav.addObject("list", list);
		
		mav.setViewName("storeList");
		//mav.setViewName("daummap2");

		return mav;
	}
}
